{include file="index/head" /}
<div class="box">
  <form method="post" action="{:url('dels')}" id="listform" data-type=ajax>
    <input type="hidden" name="nid" value="{$nid}" />
    <div class="box-head">
      <ul class="search">
        <li><a href="{:url('add',['nid'=>$nid])}" class="btn"><i class="icon-plus-square-o"></i>添加内容</a></li>
        <li><span>搜索：</span></li>
        <li><span>首页</span>
          <select name="s_ishome" onchange="sycms.search('{:url('index')}')">
            <option value="">选择</option>
            <option value="1">是</option>
            <option value="0">否</option>
          </select>
        </li>
        <li><span>推荐</span>
          <select name="s_isvouch" onchange="sycms.search('{:url('index')}')">
            <option value="">选择</option>
            <option value="1">是</option>
            <option value="0">否</option>
          </select>
        </li>
        <li><span>置顶</span>
          <select name="s_istop" onchange="sycms.search('{:url('index')}')">
            <option value="">选择</option>
            <option value="1">是</option>
            <option value="0">否</option>
          </select>
        </li>
        {if condition="$iscid eq 1"}
        <li><span>分类：</span>
          <select name="s_cid" onchange="sycms.search('{:url('index')}')">
            <option value="">请选择分类</option>                
            {volist name="cate" id="vo"}                  
            <option value="{$vo.id}">{$vo.title}</option>                
            {volist name="vo['son']" id="s"}                    
            <option value="{$s['id']}">&nbsp;&nbsp;&nbsp;|--{$s['title']}</option>                
            {volist name="s['son']" id="b"}                    	
            <option value="{$b['id']}">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|----{$b['title']}</option>                
            {/volist}
            {/volist}
            {/volist}              
          </select>
        </li>
        {/if}           
        </li>
        <li>
        <span>关健字</span>
        <input type="text" class="intxt" name="title" placeholder="请输入搜索关健字" />
        </li>
        <li>
        <button type="button" class="btn" onclick="sycms.search('{:url('index')}')"><i class="icon-search"></i> 搜索</button>
        </li>
      </ul>
      <a href="javascript:history.go(0);" class="btn fr"><i class="icon-refresh"></i> 刷新</a> </div>
    <table class="table">
      <tr>
        <th width="100">ID</th>
        <th width="8%">排序</th>
        <th width="8%">图片</th>
        <th>标题</th>
        <th>所属分类</th>
        <th>属性</th>
        <th width="10%">发布时间</th>
        <th width="200">操作</th>
      </tr>
      {volist name="list" id="v"}
      <tr>
        <td class="td1"><input type="checkbox" name="id[]" value="{$v.id}" />
          {$v.id}</td>
        <td><input type="text" class="sorttext" value="{$v.sort}"  onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9-]+/,'');}).call(this)" 
        onblur="sycms.sorts('{:url('sorts')}',{$v.id},this.value);" /></td>
        <td><a href="{$v.img}" class="imgview"><img src="{$v.img|default='__PUBLIC__/public/admin/images/noimg.jpg'}" style="background:#eee;" alt="" width="30" height="30" /></a></td>
        <td><a href="/{$v.id|getEntitle}/{$v.id}.html" target="_blank">{$v.title}</a></td>
        <td>{if condition="$v.cid eq ''"}{$v.nid|getNavName}{else/}{$v.cid|getCateName}{/if}</td>
        <td>{$v.ishome|_attr='ishome'} {$v.isvouch|_attr='isvouch'} {$v.istop|_attr='istop'}</td>
        <td>{$v.datetime|date='Y-m-d H:i:s',###}</td>
        <td><a href="{:url('add',['id'=>$v.id,'nid'=>$v.nid])}" class="btn"><i class="icon-edit"></i> 编辑</a> <a href="javascript:void(0);" onclick="sycms.del('{:url('del',['id'=>$v.id])}')" class="btn red"><i class="icon-trash-o"></i> 删除</a></td>
      </tr>
      {/volist}
      {if $list[0]}
      <tr>
        <td colspan="8"><ul class="operat">
            <li class="li1">
              <input type="checkbox" onclick="sycms.allselect(this)" />
              全选</li>
            <li><a href="javascript:void(0);" onclick="sycms.delallSelect('{:url('delAll')}')" class="btn red"><i class="icon-trash-o"></i> 批量删除</a><a href="javascript:void(0);" onclick="sycms.plattr('{:url('plsorts')}','')" class="btn"><i class="icon-trash-o"></i> 批量排序</a></li>
            <li><span>操作：</span>
              <select name="ishome" onchange="sycms.plattr('{:url('ishome')}',this)">
                <option value="">首页</option>
                <option value="1">是</option>
                <option value="0">否</option>
              </select>
              <select name="isvouch" onchange="sycms.plattr('{:url('isvouch')}',this)">
                <option value="">推荐</option>
                <option value="1">是</option>
                <option value="0">否</option>
              </select>
              <select name="istop" onchange="sycms.plattr('{:url('istop')}',this)">
                <option value="">置顶</option>
                <option value="1">是</option>
                <option value="0">否</option>
              </select>
            </li>
            {if condition="$iscid eq 1"}
            <li><span>移动到分类：</span>
              <select name="cid" onchange="sycms.plattr('{:url('movecate')}',this)">
                <option value="">请选择分类</option>                
                {volist name="cate" id="vo"}                  
                <option value="{$vo.id}">{$vo.title}</option>                
                {volist name="vo['son']" id="s"}                    
                <option value="{$s['id']}">&nbsp;&nbsp;&nbsp;|--{$s['title']}</option>                
                {volist name="s['son']" id="b"}                    	
                <option value="{$b['id']}">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|----{$b['title']}</option>                
                {/volist}
                {/volist}
                {/volist}              
              </select>
            </li>
            {/if}
            <li> <span>请选择复制：</span>
              <select name="copynum" onchange="sycms.plattr('{:url('copyArticle')}',this)">
                <option value="">请选择复制</option>
                <option value="5">复制5条</option>
                <option value="10">复制10条</option>
                <option value="15">复制15条</option>
                <option value="20">复制20条</option>
              </select>
            </li>
          </ul></td>
      </tr>
      <tr>
        <td colspan="8"><div class="page">{$page}</div></td>
      </tr>
      {/if}
    </table>
  </form>
</div>
